namespace OneWorks.Utils.FluentData
{
    using System.Text;

    public class DbCommandData
    {
        public DbContext Context { get; private set; }
        public System.Data.IDbCommand InnerCommand { get; private set; }
        public bool UseMultipleResultsets { get; set; }
        public IDataReader Reader { get; set; }
        internal ExecuteQueryHandler ExecuteQueryHandler;
        public StringBuilder Sql { get; private set; }

        public DbCommandData(DbContext context, System.Data.IDbCommand innerCommand)
        {
            this.Context = context;
            this.InnerCommand = innerCommand;
            this.InnerCommand.CommandType = (System.Data.CommandType)DbCommandTypes.Text;
            this.Sql = new StringBuilder();
        }
    }
}